home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / dgelsx.z / dgelsx
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. DDDDGGGGEEEELLLLSSSSXXXX((((3333FFFF))))                                                          DDDDGGGGEEEELLLLSSSSXXXX((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DGELSX - compute the minimum-norm solution to a real linear least squares
  10.      problem
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE DGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK,
  14.                         INFO )
  15.  
  16.          INTEGER        INFO, LDA, LDB, M, N, NRHS, RANK
  17.  
  18.          DOUBLE         PRECISION RCOND
  19.  
  20.          INTEGER        JPVT( * )
  21.  
  22.          DOUBLE         PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
  23.  
  24. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  25.      DGELSX computes the minimum-norm solution to a real linear least squares
  26.      problem:
  27.          minimize || A * X - B ||
  28.      using a complete orthogonal factorization of A.  A is an M-by-N matrix
  29.      which may be rank-deficient.
  30.  
  31.      Several right hand side vectors b and solution vectors x can be handled
  32.      in a single call; they are stored as the columns of the M-by-NRHS right
  33.      hand side matrix B and the N-by-NRHS solution matrix X.
  34.  
  35.      The routine first computes a QR factorization with column pivoting:
  36.          A * P = Q * [ R11 R12 ]
  37.                      [  0  R22 ]
  38.      with R11 defined as the largest leading submatrix whose estimated
  39.      condition number is less than 1/RCOND.  The order of R11, RANK, is the
  40.      effective rank of A.
  41.  
  42.      Then, R22 is considered to be negligible, and R12 is annihilated by
  43.      orthogonal transformations from the right, arriving at the complete
  44.      orthogonal factorization:
  45.         A * P = Q * [ T11 0 ] * Z
  46.                     [  0  0 ]
  47.      The minimum-norm solution is then
  48.         X = P * Z' [ inv(T11)*Q1'*B ]
  49.                    [        0       ]
  50.      where Q1 consists of the first RANK columns of Q.
  51.  
  52.  
  53. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  54.      M       (input) INTEGER
  55.              The number of rows of the matrix A.  M >= 0.
  56.  
  57.      N       (input) INTEGER
  58.              The number of columns of the matrix A.  N >= 0.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDGGGGEEEELLLLSSSSXXXX((((3333FFFF))))                                                          DDDDGGGGEEEELLLLSSSSXXXX((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      NRHS    (input) INTEGER
  75.              The number of right hand sides, i.e., the number of columns of
  76.              matrices B and X. NRHS >= 0.
  77.  
  78.      A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)
  79.              On entry, the M-by-N matrix A.  On exit, A has been overwritten
  80.              by details of its complete orthogonal factorization.
  81.  
  82.      LDA     (input) INTEGER
  83.              The leading dimension of the array A.  LDA >= max(1,M).
  84.  
  85.      B       (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
  86.              On entry, the M-by-NRHS right hand side matrix B.  On exit, the
  87.              N-by-NRHS solution matrix X.  If m >= n and RANK = n, the
  88.              residual sum-of-squares for the solution in the i-th column is
  89.              given by the sum of squares of elements N+1:M in that column.
  90.  
  91.      LDB     (input) INTEGER
  92.              The leading dimension of the array B. LDB >= max(1,M,N).
  93.  
  94.      JPVT    (input/output) INTEGER array, dimension (N)
  95.              On entry, if JPVT(i) .ne. 0, the i-th column of A is an initial
  96.              column, otherwise it is a free column.  Before the QR
  97.              factorization of A, all initial columns are permuted to the
  98.              leading positions; only the remaining free columns are moved as a
  99.              result of column pivoting during the factorization.  On exit, if
  100.              JPVT(i) = k, then the i-th column of A*P was the k-th column of
  101.              A.
  102.  
  103.      RCOND   (input) DOUBLE PRECISION
  104.              RCOND is used to determine the effective rank of A, which is
  105.              defined as the order of the largest leading triangular submatrix
  106.              R11 in the QR factorization with pivoting of A, whose estimated
  107.              condition number < 1/RCOND.
  108.  
  109.      RANK    (output) INTEGER
  110.              The effective rank of A, i.e., the order of the submatrix R11.
  111.              This is the same as the order of the submatrix T11 in the
  112.              complete orthogonal factorization of A.
  113.  
  114.      WORK    (workspace) DOUBLE PRECISION array, dimension
  115.              (max( min(M,N)+3*N, 2*min(M,N)+NRHS )),
  116.  
  117.      INFO    (output) INTEGER
  118.              = 0:  successful exit
  119.              < 0:  if INFO = -i, the i-th argument had an illegal value
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.